﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;

public partial class UserControl_phong_tro_user : System.Web.UI.UserControl
{
    protected string strUSID;
    protected string strName;
    protected string strEmail;
    protected string strKieuThanhVien;
    protected string strSoluongtindang;
    protected void Page_Load(object sender, EventArgs e)
    {
        strUSID = clsCommon.fncGetRoute(this.Page, "param1");
        hdUSID.Value = strUSID;
        if (!IsPostBack)
        {
            xGetUser();
        }
    }

    protected void xGetUser()
    {
        DataSet dtS = clsUsers.USER_FND(1,1,strUSID,"","",-1,-1);
        DataTable dtUser = dtS.Tables[0];
        strEmail = dtUser.Rows[0]["us_email"].ToString();
        strName = dtUser.Rows[0]["us_hoten"].ToString();

        Boolean blMoiGioi = Convert.ToBoolean(dtUser.Rows[0]["us_moigioi"]);
        strKieuThanhVien = "Người dùng bình thường";
        if (blMoiGioi) strKieuThanhVien = "MÔI GIỚI";
    }

}